package com.hyp.sqlSession;

import com.hyp.pojo.Configuration;
import com.hyp.pojo.MappedStatement;

import java.util.List;

public interface Executor {

    /**
     * 查询
     * @param configuration
     * @param mappedStatement
     * @param params
     * @param <E>
     * @return
     * @throws Exception
     */
    <E> List<E> query(Configuration configuration,
                      MappedStatement mappedStatement,
                      Object... params) throws Exception;


    /**
     * 更新
     * @param configuration
     * @param mappedStatement
     * @param params
     * @return
     * @throws Exception
     */
    int update(Configuration configuration,
               MappedStatement mappedStatement,
               Object... params) throws Exception;


}
